<!DOCTYPE html>
<html>
<head>
	<title>订单详情</title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable">
	<meta content="yes" name="apple-touch-fullscreen">
	<meta content="telephone=no,email=no" name="format-detection">
	<link rel="stylesheet" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/normalize.css" type="text/css">
	<link rel="stylesheet" type="text/css" href="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/css/orderDetails.css">
	<script type="text/javascript" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/js/jisuan.js">
	</script>
	<script type="text/javascript">
		//调用微信JS api 支付
		function jsApiCall()
		{
			WeixinJSBridge.invoke(
					'getBrandWCPayRequest',
			<?php echo $jsApiParameters; ?>,
			function(res){
//					alert(JSON.stringify(res));
//                    alert(res.err_msg)
                   // WeixinJSBridge.log(res.err_msg);
				if(res.err_msg == "get_brand_wcpay_request:ok"){
//                        alert(1)
					/*这里写如果支付成功的话执行什么操作*/
//						alert('支付成功'+JSON.stringify(res));
					wstMsg('下单成功');
					setTimeout(function(){
						location.href = WST.U('WebApp/Orders/index');
					}, 500);
					storageRemoveItem('orderInfo');
				}else{
					//返回跳转到订单详情页面
					alert('支付失败');

				}
			}
		);
		}
		function callpay()
		{
			if (typeof WeixinJSBridge == "undefined"){
				if( document.addEventListener ){
					document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
				}else if (document.attachEvent){
					document.attachEvent('WeixinJSBridgeReady', jsApiCall);
					document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
				}
			}else{
				jsApiCall();
			}
		}

	</script>
	<style type="text/css">
		.zhifu{
			width:9.466667rem;
			margin:0 auto;
			height:auto;
			overflow: hidden;
			padding-top:0.746667rem;
		}
		.zhifu_img{
			width:3.15rem;
			height:1.546667rem;
			float: left;
		}
		.zhifubao{
			width:100%;
			height:100%;
			position: fixed;
			bottom:0;
			left:0;
			display: none;
		}
		.zTop{
			position: absolute;
			bottom:0;
			left:0;
			background:#000;
			opacity: .5;
			width:100%;
			height:100%;
		}
		.Zbot{
			width:5.866667rem;
			height:3.6rem;
			position: absolute;
			top:50%;
			left:50%;
			padding:0.4rem;
			margin-top:-2rem;
			margin-left:-3.33333rem;
			background:#fff;
			color:#202020;
			font-size:0.32rem;
		}
		.botText{
			width:100%;
			height:70%;
			word-break: break-all;
			word-wrap:break-word;
		}
		.topText{
			width:100%;
			height:1.06rem;
			text-align: center;
			font-size:0.37rem;
			color:#787878;
			line-height: 1.06rem
		}
	</style>
</head>
<body>
<div class="container">
	<div class="main">
		<div class="main_top">
			<div class="name">
				<if condition="$data['bookType'] eq 1">微信忆书
					<elseif condition="$data['bookType'] eq 2"/>空间相册书
					<elseif condition="$data['bookType'] eq 3"/>微博忆书
					<else/>照片书·忆书
				</if>
			</div>
			<div class="paiban">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Group 7 Copy 2.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">数量:</span>
					<input readonly type="" name="" value="{$data['goodsNums']}" class="number_input">
					<span>本</span>
				</div>
			</div>
			<div class="paiban padding_top">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 2.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">页数：</span>
					<input readonly type="" name="" value="{$data['page']}" class="number_input">
					<span>页</span>
				</div>
			</div>
			<div class="paiban padding_top">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 5.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">印刷：</span>
					<span class="span_color">标配用惠普indigo数码六色超高清印刷</span>
				</div>
			</div>
			<div class="paiban padding_top">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 36.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">尺寸纸张类别：</span>
					<span class="span_color">{$data['papersize']}</span>
				</div>
			</div>
			<div class="paiban padding_top">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Group 6.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">装帧：</span>
					<span class="span_color">{$data['bookbinding']}</span>
				</div>
			</div>
			<div class="paiban padding_top">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 3.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">价格：</span>
					<span class="span_color">{$data.realTotalMoney}      ( 限时折扣价:{$data.totalpay})</span>
				</div>
			</div>
		</div>
		<div class="main_top top">

			<div class="paiban padding_top padding">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 6 Copy.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">订单编号：</span>
					<span class="span_color">{$data['orderNo']}</span>

				</div>
				<!--<span class="fuzhi right">复制</span>-->
			</div>
			<div class="paiban padding_top">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/time.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">订单创建时间：</span>
					<span class="span_color">{$data['createTime']}</span>
				</div>
			</div>
			<div class="paiban padding_top">
				<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 24 Copy.png" class="img"></div>
				<div class="paiban_input left">
					<span class="bold">收件地址及信息：</span>
					<span class="span_color height">{$data.userName}；{$data.userPhone}；<br>{$data.province}{$data.city}{$data.region}{$data.userAddress}；</span>
					<!-- <span>广东省中山市坦洲镇南祥街161-1；</span> -->
				</div>
			</div>
			<!--<div class="paiban padding_top">-->
				<!--<div class="paiban_img left"><img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/wuliu.png" class="img"></div>-->
				<!--<div class="paiban_input left">-->
					<!--<span class="bold wuliu_color">查看物流信息</span>-->

				<!--</div>-->
			<!--</div>-->
		</div>
	</div>
	<div class="zhifu">
		<div class=zhifu_img onclick="jsApiCall()">
			<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 33.png" style="width:100%;height:100%;">
		</div>
		<!--<div class=zhifu_img onclick="aliPayOrder({$orderId})">-->
		<!--<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 33 Copy.png" style="width:100%;height:100%;">-->
	<!--</div>-->
		<!--<div class=zhifu_img onclick="taobaoOrder({$orderId},{$data['userPhone']})">-->
			<!--<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 33 Copy 2.png" style="width:100%;height:100%;">-->
		<!--</div>-->
	</div>
	<div class="zhifubao">
		<div class="zTop"></div>
		<div class="Zbot">
			<div class="botText">sdsadsadsdasdsadsadsadsdsadasdsadsad</div>
			<div class="topText">长按复制此链接</div>
		</div>
	</div>
</div>
<include file="./Apps/WebApp/View/default/common_js.html" />
<script>
	$('.zTop').click(function(){
		$('.zhifubao').hide();
	})
	function wxPayOrder(orderId){
		location.href= WST.U('WebApp/Cart/wxpay','orderId='+orderId);
	}
	function aliPayOrder(orderId){
		location.href = WST.U('WebApp/Hot/getParams', 'orderId='+orderId);
	}
	function taobaoOrder(orderId,userPhone){
//		$.post(WST.U('WebApp/Orders/sendPhoneCodeToBind'), {orderId: orderId ,userPhone: userPhone}, function(data){

//			var json = WST.toJson(data);
//			alert(json);
//			if(json.status == 1){
				location.href = WST.U('WebApp/Hot/taobao', 'orderId='+orderId);
//			}


//		});

	}

</script>
</body>
</html>